package io.renren.common.interceptor;


import io.renren.modules.sp.dto.SpUserDTO;

public class UserContext {


	private static final ThreadLocal<SpUserDTO> contextHolder = new ThreadLocal<SpUserDTO>();


	public static void put(SpUserDTO c) {
		contextHolder.set(c);
	}


	public static SpUserDTO getUser() {
		SpUserDTO c = contextHolder.get();
		if(c!=null){
			return c;
		}else{
			return null;
		}
	}



	public static void clear(){
		contextHolder.remove();
	}













}
